package com.tiancheng.trade.settlement.feign;

import com.tiancheng.trade.commom.core.data.Result;
import com.tiancheng.trade.settlement.exception.BusinessException;
import com.tiancheng.trade.settlement.vo.settlement.admin.res.OrderResVO;
import com.tiancheng.trade.settlement.vo.settlement.admin.res.SubOrderResVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Auther: liudong
 * @Date: 2024/4/20 17:33
 * @Param ${tags}
 * @Description:
 */
@FeignClient(value = "trade-order")
public interface OrderService {


    @GetMapping("/api/sub/{subOrderId}")
    Result<SubOrderResVO> fetchQuerySubOrder(@PathVariable("subOrderId") String subOrderId) throws BusinessException;

    @GetMapping("/api/sub/findByFlowId")
    Result<List<OrderResVO>> fetchQueryOrderByFlowId(@RequestParam("flow_id") String flowId) throws BusinessException;

    @GetMapping("/api/sub/findSubOrderByDate")
    Result<List<SubOrderResVO>> fetchSubOrderByDate(@RequestParam("date") String date) throws BusinessException;

}
